package a.jframe;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.TextField;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

import javax.swing.DefaultListModel;
import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;

public class LabCredentials extends BASEFRAME {

	 public LabCredentials() {
		jframe=1;
		list_();
		createpanel();
		pack();
		setVisible(true);
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	void createpanel(){
		JPanel login= new JPanel();
		JLabel a2=new JLabel("Password:");
		JLabel emptylabel=new JLabel(" ");
		JList aa2=new JList();
		JButton saveNewCommand=new JButton("Save");
		saveNewCommand.addActionListener(new ActionListenerPanel("saveNewLab"));
		GridLayout gl=new GridLayout(3,3);
		GridLayout g2=new GridLayout(4,0);
		fieldWithCommandName.setPreferredSize(new Dimension(80,20));
		fieldWithSyntaxOfCommand.setPreferredSize(new Dimension(80,20));
		
		JPanel pane = new JPanel(gl);
		JPanel pane2 = new JPanel(g2);
		GroupLayout layout = new GroupLayout(pane2);
		 pane2.setLayout(g2);
		//pane2.add(a2, g2);
		pane2.add(emptylabel, g2);
		pane2.add( scrollPane,g2);
		pane2.add(saveNewCommand,g2);
		pane.setSize(100,350);
		pane.add(new JLabel("User :"), gl);pane.add(fieldWithCommandName, gl);
		pane.add(new JLabel("Password :"), gl);pane.add(fieldWithSyntaxOfCommand, gl);
		pane.add(new JLabel("IP :"), gl);pane.add(new TextField(), gl);
		getContentPane().add(pane,BorderLayout.PAGE_START);
		getContentPane().add(pane2,BorderLayout.CENTER);
		getContentPane().setName("CREDENTAILS");
		setPreferredSize(new Dimension(500,400));
		zamykanie();
	}

}
